package org.vossnet.sfig;


/**
 * A call-back interface for use when iterating bean definitions.
 * 
 * <p>Typically will implement instances as an anonymous inner class.
 * 
 * @see RunFig#forEach(ProcessOnBeanDef)
 * 
 * @author rogerv
 */
public interface ProcessOnBeanDef {
    /**
     * Iteration may be prematurely halted by returning a result of false.
     * @param rtn the context returned from the lexical and grammar parsing phase.
     * @param beanDef bean definition meta information.
     * @return must return true for iteration to continue until exhaustion.
     * @throws Exception
     */
    boolean process(SFigParser.file_return rtn,BeanDef beanDef) throws Exception;
}
